<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class THisdataSoilph extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_hisdata_SoilPH', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->bigIncrements('hd_index')->nullable(false)->comment('');
			$table->datetime('rd_updatetime')->nullable(false)->comment('');
			$table->datetime('hd_datetime')->nullable(false)->comment('');
			$table->unsignedBigInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->float('hd_SoilPH1', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH2', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH3', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH4', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH5', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH6', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH7', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH8', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH9', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH10', 9, 2)->nullable()->default(0)->comment('');
			$table->float('hd_SoilPH_num', 9, 2)->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH1hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH2hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH3hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH4hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH5hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH6hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH7hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH8hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH9hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH10hwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH1lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH2lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH3lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH4lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH5lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH6lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH7lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH8lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH9lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH10lwarn')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH1consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH2consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH3consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH4consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH5consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH6consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH7consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH8consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH9consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_SoilPH10consta')->nullable()->default(0)->comment('');
			$table->boolean('hd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('hd_index', 'hd_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_hisdata_SoilPH');
    }
}
